package generator

import "beergo/plugins/maker"

func init() {
	ProfileMain()
	ProfileWork()
	ProfileEdu()
}

func ProfileMain() {
	c := maker.CreateTable("ProfileMain","简历主体","hr")
	c.AddName()
	c.AddInt("sex","性别")
	c.AddText("phone","手机号")
	c.AddText("mail","邮箱")
	c.AddText("birthday","出生日期")
	c.AddArt("intro","自我评价")
	c.AddManyToOne("degree","学历","Degree")
	c.AddOneToMany("edu","教育经历","ProfileEdu")
	c.AddOneToMany("work","工作经历","ProfileWork")
	c.AddCreateBy()
	c.Generate()
}

func ProfileWork() {
	c := maker.CreateTable("ProfileWork","工作经历","hr")
	c.AddManyToOne("main","主体","ProfileMain")
	c.AddText("school","学校")
	c.AddText("major","专业")
	c.AddManyToOne("degree","学历","Degree")
	c.AddText("startTime","开始时间")
	c.AddText("endTime","结束时间")
	c.Generate()

}

func ProfileEdu() {
	c := maker.CreateTable("ProfileEdu","教育经历","hr")
	c.AddManyToOne("main","主体","ProfileMain")
	c.AddText("company","公司")
	c.AddText("job","岗位")
	c.AddArt("intro","工作内容")
	c.AddText("startTime","开始时间")
	c.AddText("endTime","结束时间")
	c.Generate()
}


